document.getElementById("test");

function highlightTd(tableId, start, end) {
	var table = document.getElementById(tableId);
	var tds = table.getElementsByTagName("td");
	for ( var i = 0; i < tds.length; i++) {
		if (tds[i].hasAttribute("style")) {
			tds[i].removeAttribute("style");
		}
	}
	for ( var i = start; i <= end; i++) {
		tds[i].setAttribute("style", "border: solid 1px #f00;");
	}
}

function highlightBlocks(start, end) {
	highlightTd('binTable', start, end);
	highlightTd('charTable', start, end);
}